A Graphical History of the United States Legislative Branch

by Tim Avitabile, Northeastern University, DS4200, Spring 2024

All data is updated through 8 March 2024 - the source code can be found here.


Introduction

The United States legislative branch of government is split into two houses: the upper house is the Senate and the lower house is the House of Representatives. The two houses of congress met for the first time in 1789, and throughout their 235 years of history, there have been 2,002 individuals who served in the Senate and 11,387 who served in the House. Today there are 100 senators, two for each state, and 438 representatives, with different numbers for each state based on population. All the data for this project is readily available on Wikipedia (Senators, Representatives), and the Python library BeautifulSoup was used to scrape the desired pages. After this, more python code was used for processing the data and preparing it for the following visualizations. The goal of this project is to look at how the composition of Congress has changed over the past 235 years by observing metrics including party, gender, age, and duration.

The above visualizations show how the composition of both houses of congress has changed over time. In each visualization, the members of congress are first organized by party, and then within each party are ordered by how long they have been in their position. Hovering over any dot will provide more information about that member of congress. The color of each member corresponds to the party, using the most common coloring scheme for the major American political parties. The slider on each visualization allows the user to navigate to any year of the congress to learn more about that year's composition.


Political Party

These charts show how the political party composition of both houses of congress has changed throughout the nation's history, with time represented on the x-axis. The colors are identical to the visualizations above, corresponding to political party. The y-axis here is the percentage of each house that is taken up by each political party. These visualizaitions clearly show how the divide between Democrats and Republicans has dominated American politics since the end of the Civil War, when their last remaining competitor, the Whig party, dissolved. Years on the top graphs can be selected so that the pie charts on the bottom change to reflect the composition during that period of history.


Gender

Similar to the charts above, this visualization shows the gender balance between men and women in both houses of congress over time. It is clear to see how severe the disparity between men and women in congress has been over time, with the first female representative and first female senator not taking office until 1917 and 1931, respectively. However, this chart also shows just how quickly women have elevated their presence in congress over the last 50 years, suggesting a positive trend toward an equal representation in congress.

This visualization, the only one made using D3 instead of Altair, shows the path toward gender equality in the senate. Each dot on the graph represents a year, with the x-axis representing percent of women in the Senate and the y-axis representing percent of women in the House of Representatives. Each year is connected to the previous and following year on the graph, resulting in a single line that traces the gender balance in both houses over time. The line naturally starts at 0, when there were no women in the Senate or House, but then moves up and to the right slowly, then much quicker, until reaching its current 2024 point of 30% women in the House and 25% women in the Senate. The top right corner of the graph represents 50% women in both houses of congress, which would correspond to perfect gender representation.


Age and Duration

These charts focus on the ages of members of congress, as well as the number of years they have spent in their position, referred to as duration. For each each house and for each of age and duration, there is a graph with year on the x-axis and time in years on the y-axis. Each graph has five lines, corresponding to the minimum age/duration, 25th percentile, median, 75th percentile, and maximum age/duration. In both houses, the average age has increased steadily since the 1980s to current all-time highs. The current median age is 67 in the Senate and 59 in the House, with the maximum age being 90 in the Senate and 87 in the House. The Senate age graph peaks at 100 in 2003, when Strom Thurmond retired at the age of 100. Median duration has increased over time in both houses, while maximum duration has increased drastically. The current median duration is 11 years in the Senate and 7 years in the House. The all-time longest durations for each house were Robert Byrd serving 51 years in the Senate and John Dingell serving 60 years in the House of Representatives.


Conclusion

Both houses of congress have changed drastically over the past 235 years, and would likely be unrecognizable to any of the founding fathers. Most notably, the once all-male congress has shown a clear trend toward equal gender representation, a trend that is only accelerating. Both houses are at least halfway toward an equal number of men and women, and most of this representation has appeared in the past fifty years. In terms of political party, the data shows an interesting story of a decades-long fight for dominance and irrelevance during the beginning of the country, but sees the past 150 years as a back-and-forth between the Democratic and Republican parties, a dichotomy that shows no sign of disappearing soon. The ages of members of congress is often criticized in the news, and the data shows that there has been a clear increase in median member age since the end of the 20th century, a trend which may continue to increase. Duration of time spent in congress is much more severe, with new records constantly being set and broken over the past hundred years. The maximum duration line is getting farther and farther away from the median and other percentiles as time goes on, indicating a small group of individuals who are able to retain power for decades longer than their peers.